package com.company.exam13;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * 第13题  通过JDBC修改员工表中编号为7369的员工姓名与职位信息。（10分）
 */
public class test13 {
		public static final String DB_DRIVER="oracle.jdbc.driver.OracleDriver";
		public static final String DB_URL="jdbc:oracle:thin:@localhost:1521:XE";
		public static final String DB_USER="scott";
		public static final String DB_PASS="a123456";
		
		public static void main(String[] args) throws ClassNotFoundException, SQLException {
			Connection connection=null;
			Statement	stmt=null;
			Class.forName(DB_DRIVER);
			connection=DriverManager.getConnection(DB_URL, DB_USER, DB_PASS);
			stmt=connection.createStatement();
			stmt.executeUpdate("update EMP set ename='xiugai'  where empno=7369");
			stmt.executeUpdate("update EMP set  job='staff' where empno=7369");
			
			stmt.close();
			connection.close();
			
		
	}

}
